
import re
import falcon
import json

# from sqlalchemy.orm.exc import NoResultFound
# from cerberus import Validator, ValidationError


from sqlalchemy.orm import relationship
from app import log
from app.api.common import BaseResource,CollectionResource,SingleResource

from app.errors import AppError, InvalidParameterError

LOG = log.get_logger()

# class ProductResource(CollectionResource):
#     def __init__(self, db_engine, *args, **kwargs):
#         super(ProductResource, self).__init__(db_engine, *args, **kwargs)
#         self.model = self.auto_base_model('products')
#         self.default_sort = ['-Name']
#         self.response_fields = ['ProductID', 'Name', 'Price']
#         self.methods = ['GET']